Generating Process Platform Web Service Operations for External Web Services |
|
Before you begin this task:
- The standard application Process Platform CWS External Web Service Model must be installed.
- Create the UDDI Service Container and ensure that it is running.
- Create a project in CWS.
Web services are extensively used in the Process Platform. Since Web services are standards-based and have a well defined contract, they play an important role in modelling the application in the design time and provide a simple way to invoke them in the runtime. Web services can be generated not only on standard Process Platform models such as BPM or Database tables but also on external Web services to make them available on the Process Platform. The following procedure explains how to use the wizard to generate Web services on top of external services.
- Access Web Service ( ) to generate Web service operations. The Web services Generation Wizard appears, displaying Untitled Web Service - Web Service page.
- Select Import WSDL option from the Select the Source drop-down list.
- Type the appropriate name and description in the respective fields of the wizard and click Next. The next page of the Web services Generation Wizard appears.
- Type the URL that points to the WSDL in the URL field (for example, https://secure.jajah.com/api/SMSService.asmx?wsdl).
Note:
If you want to use an external Web service from Process Platform Process Factory (CPF), follow the below procedure to obtain its URL.- Open the MashApps Composer window.
- Select Build Web services > All WebServices. It lists all available Web services.
- Double-click the required Web service to view its details.
- Copy the URL provided in the WSDL URL field.
- If reading the WSDL requires authentication, select the Authentication Details option and type the credentials. These login details will allow you to read the WSDL.
- Click Show Services. To search the business entity or business service in the UDDI registry, click .
Note:
- If the WSDL XML is invalid or returning content with invalid Content-Type property, the notification message "WSDL/Schema document is invalid or not present. Make sure the server is returning the content in proper format" is displayed.
- If a request is unsuccessful, the message "Could not read the HTTP URL. The server has returned HTTP Error <code>" is displayed at times.
- To access an external Web service from the local intranet zone, you must change the security settings in your browser.
- Select the required WSDL type from the WSDL Type list.
Note:
Types of WSDLs are as follows:If the WSDL is
Then
Implementation WSDLs
You can invoke the Web service operations directly, since the implementation is readily available for each operation. Hence, for these WSDLs, you can select the required Web service operations and proceed with the generation of Web services.
Interface WSDLs
In this type of WSDLs, the Web service operations do not have an implementation. Hence, you must implement all the Web service operations on the Process Platform. To implement Web service operations, you need to select the Contract check box in the Properties sheet, while defining the properties of the business process model. To generate Web service operations for this type, the operations under all the Port Types are selected by default and you must necessarily generate operations for all of them.
- Select a Port Type from the Web Services drop-down list. The Web Service Operations defined in the WSDL for the selected port type are displayed in the Web Service Operations list.
- Namespace is automatically picked up from the WSDL.
- Click Finish. The Web service is listed in the project menu.
Note:
- If the imported Web service definition sets exist in the workspace, they will be updated with the latest content. If they are not found in the workspace, the newly created imported definition sets will be stored in the importedwsdls folder under the project.
- If the imported schemas exist in the workspace, they will be updated with the latest content. If they are not found in the workspace, the newly created schemas will be stored in the importedschemas folder under the project.
- However, there will be no change in the view of the definition set hierarchy as the imported schemas and WSDLs are displayed under the definition set.
- Attach a service group to a Web service interface.
Note:
- If you do not specify the organization, the Web service gets published to the default organization set for the authenticated user.
- You can only consume WS-I Basic Profile compliant Web services.
Caution:
It is recommended not to use the Web service Generator for generating Web services for internal (Process Platform) Web services. This can cause a namespace to be attached to two different Service Groups (example LDAP and UDDI), which may result in request being routed to the wrong Service Group.After you complete this task:
Publish the Web service.
Related reference: